package com.hefeng.example.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hefeng.example.domain.CustomerManualWorkOrder;
import com.hefeng.example.domain.DeviceAutomaticAlarmWorkOrder;
import com.hefeng.example.domain.WorkOrderDistribution;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface WorkOrderDistributionMapper extends BaseMapper<WorkOrderDistribution>, MPJBaseMapper<WorkOrderDistribution> {


    /**
     * 维保人员转派工单处置列表
     *
     * @param
     * @return
     */
    IPage<CustomerManualWorkOrder> listWorkOrderDistribution(@Param("dispatcher") String dispatcher, @Param("page") IPage<CustomerManualWorkOrder> page);

    /**
     * 维保人员处理中工单列表
     *
     * @param dispatcher
     * @return
     */
    List<Map> disposeingAlarmWork(@Param(value = "dispatcher") String dispatcher);

    List<Map> disposeingManualWork(@Param(value = "dispatcher") String dispatcher);


    /**
     * 维保逾期工单
     *
     * @param dispatcher
     * @return
     */
    List<Map> LateWork(@Param(value = "dispatcher") String dispatcher);

    List<Map> LateWorkT(@Param(value = "dispatcher") String dispatcher);

    /**
     * 维保完成的工单
     *
     * @param dispatcher
     * @param
     * @return
     */
    List<Map> finishWork(@Param(value = "dispatcher") String dispatcher);

    List<Map> finishWorkT(@Param(value = "dispatcher") String dispatcher);


    int updateAlarm(@Param(value = "deviceAutomaticAlarmWorkOrder") DeviceAutomaticAlarmWorkOrder deviceAutomaticAlarmWorkOrder);


    WorkOrderDistribution select(String workId);


}
